package com.xinya.navigationapplication.fragment

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment

/**
 *
 * @ClassName:      BaseFragment
 * @Description:     java类作用描述
 * @Author:         mhzhuxinya@163.com
 * @UpdateRemark:   更新说明：
 * @Version:        1.0
 */
abstract class BaseFragment : Fragment() {

    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        val rootView = inflater.inflate(getLayoutResId(), container, false)

        initView(rootView)

        return rootView
    }

    abstract fun initView(rootView: View)

    abstract fun getLayoutResId(): Int

}
